package Configuration;

import Controller.Tasker;

public class Refresh implements Runnable{
  /* {src_lang=Java}*/


  private int type;
  Tasker tasker;
  private int min;
  	public Refresh(int type, int min, Tasker tasker)
  	{
  		this.type=type;
  		this.min=min;
  		this.tasker=tasker;
  		
  		Thread t = new Thread(this);
  		t.start();
  		//tasker.updateMoodle();
  	}
  	public void run()
  	{
  		while(true)
  		{
  			
  			try {
				Thread.sleep(60000*10);
//  				Thread.sleep(6000);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
  			tasker.updateMoodle();
  		}
  	}
	public Integer getType() {
		return type;
	}
	
	public void setType(Integer type) {
		this.type = type;
	}
	
	public Integer getMin() {
		return min;
	}
	
	public void setMin(Integer min) {
		this.min = min;
	}
  


}